# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
pkgname=mkinitcpio-tinyssh
pkgver=0.0.4
pkgrel=4
pkgdesc="Archlinux mkinitcpio hook to install and enable the tinyssh daemon in early userspace"
arch=('any')
url="https://github.com/grazzolini/mkinitcpio-tinyssh"
license=('BSD')
depends=('mkinitcpio-busybox' 'psmisc' 'tinyssh')
optdepends=('mkinitcpio-netconf: Network interface configuration'
            'tinyssh-convert: For converting OpenSSH keys')
conflicts=('mkinitcpio-dropbear')
source=("${pkgname}-${pkgver}.tar.gz::$url/archive/v$pkgver.tar.gz"
        "${pkgname}-${pkgver}.tar.gz.sig::$url/releases/download/v$pkgver/v$pkgver.tar.gz.sig")
changelog='ChangeLog'
sha512sums=('465d4beb3ddfb1c5372ff04486caa37b4fd2bd4dbb55a2231e47cc45eec76b112167385681e6dd4f3c3b6858537014c62c1d0776c4990559aebafff0b01ffdd9'
            'SKIP')
validpgpkeys=('ED2A707C15D4A9E57535C1E7354AAB6377B981BC') # Giancarlo Razzolini <grazzolini@gmail.com>

package() {
  install -Dm644 "$srcdir/$pkgname-$pkgver/tinyssh_hook"      "$pkgdir/usr/lib/initcpio/hooks/tinyssh"
  install -Dm644 "$srcdir/$pkgname-$pkgver/tinyssh_install"   "$pkgdir/usr/lib/initcpio/install/tinyssh"
  install -Dm644 "$srcdir/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
